package com.guotong.sysUser;



import com.guotong.common.exception.GlobalException;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@RestController

public class SysUserController {

    private List<SysUser> sysUsers = new ArrayList<>();
    @PostMapping("/sys_user")
    public ResponseEntity<List<SysUser>> addSysUser (@RequestBody SysUser sysUser){
        System.out.println(sysUser);
        sysUsers.add(sysUser);
        return  ResponseEntity.ok(sysUsers);
    }

    @GetMapping("/sys_user")
    public void getSysUser(){
//        return ResponseEntity.ok(sysUsers);
    throw new GlobalException(333,"cuowu");
    }


}
